/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.freedom.railhunter.ui.component;

import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
 *
 * @author Alan
 */
public class CloseableLabel<E> extends JLabel {
    
    private E element;
    
    public CloseableLabel(E e) {
        super(e.toString());
        this.element = e;
        this.setOpaque(true);
        this.setBackground(Color.ORANGE);
        setIcon(new ImageIcon(getClass().getResource("/img/close.jpg")));
    }

    public E getElement() {
        return element;
    }

    public void setElement(E element) {
        this.element = element;
    }
}
